
<?php
include_once "function_obj_ip.php";

$in_array['Name'] = $_POST['objname'];
$in_array['IpType'] = $_POST['selectIP'];

if ($in_array['IpType'] == "0")
{
	$in_array['Ip1'] = $_POST['SIP'];
	$in_array['Ip2'] = $_POST['EIP'];
	$in_array['NetMask'] = "";
}

if ($in_array['IpType'] == "1")
{
	$in_array['Ip1'] = $_POST['NIP'];
	$in_array['NetMask'] = $_POST['MASK'];
	$in_array['Ip2'] = "";
}
if ($in_array['IpType'] == "2")
{
	$in_array['Ip1'] = $_POST['IPadd'];
	$in_array['Ip2'] = "";
	$in_array['NetMask'] = "255.255.255.255";
}

AppendXmlIpObject($in_array);

echo("<meta http-equiv='refresh'content=0;URL='obj_ip_object_list.php'>");
?>
